import { IFeidaoAiBrowserComponent } from '@feidao/web/interfaces';
import nodejs from '@feidao/web/atom/browser/msg/nodejs';

export default async function a005(fd: IFeidaoAiBrowserComponent, ...args: any[]) {
	// 生成考试日期
	const target_node = args[0].target;
	const exam_id = target_node.getAttribute('data-feidao-id');
	const res = await nodejs(fd.data.spaceid, 'exam_date_add', { exam_id });
	if (res === 'success') {
		alert('生成考试日期成功');
	} else {
		alert('生成考试日期失败');
	}
}
